﻿using BLL;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Model;

namespace L20240918s.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class LoginController : ControllerBase
    {
        public LoginController(LoginBll bll)
        {
            Bll = bll;
        }

        public LoginBll Bll { get; }

        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="Name">用户名</param>
        /// <param name="Pwd">添加</param>
        /// <returns></returns>
        /// 
        [HttpGet("GetLogin")]
        public IActionResult GetLogin(string Name, string Pwd)
        {
            Login info = Bll.GetLogin(Name, Pwd);
            return Ok(new
            {
                data=info
            });
        }
    }
}
